<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once(APPPATH . '/controllers/super_admin' . EXT);

class Home extends Super_admin {

    function __construct()
    {
            parent::__construct();
            
        $this->load->model(array(
            'Information_model'
        ));

        $this->load->helper(array(
                'date',
                'file',
                'form',
                'html',
                'language',
        ));
    }    

    public function index()
    {

            $this->load->view('public/home');
    }

    public function how_it_works()
    {
        
        $args = array(
            'select' => '*',
            'where' =>  array('information_type' => 'How It Works'),
        );

        $data['contents'] = $this->Information_model->get_list($args);

        $this->load->view('public/how_it_works', $data);
    }
    
    public function courses()
    {
        $args = array(
            'select' => '*',
            'where' =>  array('information_type' => 'Courses'),
        );

        $data['contents'] = $this->Information_model->get_list($args);

        $this->load->view('public/courses', $data);
    }
    
    public function contact()
    {
        
        $args = array(
            'select' => '*',
            'where' =>  array('information_type' => 'Contact'),
        );

        $data['contents'] = $this->Information_model->get_list($args);
        

        $this->load->view('public/contact', $data);
    }
    
    public function faq()
    {
        
        $args = array(
            'select' => '*',
            'where' =>  array('information_type' => 'FAQ'),
        );

        $data['contents'] = $this->Information_model->get_list($args);

        $this->load->view('public/faq', $data);
    }
    
    public function about()
    {
        
        $args = array(
            'select' => '*',
            'where' =>  array('information_type' => 'about'),
        );

        $data['contents'] = $this->Information_model->get_list($args);

        $this->load->view('public/about', $data);
    }

    public function unauthorized()
    {
        $this->load->view('unauthorizedview');
    }

}

/* End of file home.php */
/* Location: ./application/controllers/home.php */
